<?php
use \yii\helpers\Url;
?>
<form action="<?=Url::toRoute(['params/import'])?>" method="post" id="post_form" enctype="multipart/form-data">
    <table class="post_table" id="post_table">
        <tbody>
        <tr>
            <td>字段说明</td>
            <td>用户名不能重复(建议手机号码),用户密码不能少于6位.</td>
        </tr>
        <tr>
            <td>字段说明</td>
            <td>性别和店铺类型请填写整数(性别 1男 2女 3保密) (店铺类型 1特约 2堆垛 3无).</td>
        </tr>
        <tr>
            <td>选择上传文件</td>
            <td>
                <input type="hidden" name="MAX_FILE_SIZE" value="5000000" />
                <input name="file" type="file" class="btn btn-warning" />
            </td>
        </tr>
        </tbody>
    </table>
    <input id="addBtn" type="submit" name="submit" class="btn btn-success btn-lg" style="margin:20px 200px;text-align:center;" value="批量导入用户数据">
</form>
<?php
if(!empty($data)){//对反馈导入数据的成功失败进行展示，提示用户
    if($data['error'] == '0'){
        $okk = $data['info']['okk'];
        $err = $data['info']['err'];
        foreach ($err as $errItem){ echo '<p style="color:#ff5800">'.$errItem.'</p>'; }
        echo '<hr>';
        foreach ($okk as $okkItem){ echo '<p style="color:green">'.$okkItem.'</p>'; }
    }else{
        echo '<h2 style="color:#ff5800">'.$data['msg'].'</h2>';
    }
}